if !SERVER then return end
include("gcommunicate/gcommunicate_init.lua")

local function gcommunicate_loadplugins(location)
	local files = file.FindInLua( "gcommunicate/plugins/" .. location .. "/*" )
	if #files > 0 then
		for _, thefile in ipairs( files ) do
	
			if (thefile != "." and thefile != ".." and thefile != ".svn") then
				if (file.IsDir("../addons/GCommunicate/lua/gcommunicate/plugins/" .. location .. thefile)) then
					Msg("LOADING PLUGIN:" .. string.upper(thefile) .. "\n")
					gcommunicate_loadplugins(location .. "/" .. thefile .. "/")
				else
					if !string.find(thefile, "cl_") then
						include("gcommunicate/plugins/" .. location .. "/" .. thefile)
					else
						AddCSLuaFile("gcommunicate/plugins" .. location .. thefile)
					end				
				end
			end
		end
	end
	
	
	
end

gcommunicate_loadplugins("")
	